<?php
	if (is_admin())
		add_action("admin_menu", "setup_theme_admin_menus");
	function setup_theme_admin_menus()
	{
		// Parent menu
		add_menu_page('General Settings', 'DealX settings', 'manage_options', 'cpx_theme_setting',
			'theme_settings_page');
		// Childs menu
		add_submenu_page('cpx_theme_setting', 'Social settings', 'Social settings', 'manage_options',
			'social-settings', 'social_settings');
		add_submenu_page('cpx_theme_setting', 'Following Emails', 'Following Emails', 'manage_options',
			'following-emails', 'follow_emails');
	}
	function theme_settings_page()
	{
		include ('setting-page/theme_setting.php');
	}
	function social_settings()
	{
		include ('setting-page/social_setting.php');
	}
    function follow_emails()
	{
		include ('setting-page/following_emails.php');
	}
?>